%classify according to hist features
clear,clc,close all;

load('data/MSRAction3D/AS2/output_L1.mat');
load('data/MSRAction3D/AS2/output_L2.mat');
load('data/MSRAction3D/AS2/output_L3.mat');
load('data/MSRAction3D/AS2/output_L4.mat');


[s1 s2] = size(output_L1);

features = [];
lbl = [];
for k = 1:s2

    feature_1 = [];
    feature_2 = [];
    feature_3 = [];
    feature_4 = [];
    
    feature_1 = [feature_1, output_L2(1,k).H(1).hist];
    feature_2 = [feature_2, output_L2(1,k).H(1).hist, ...
        output_L2(1,k).H(2).hist];
    feature_3 = [feature_3, ...
        output_L3(1,k).H(1).hist, ...
        output_L3(1,k).H(2).hist, ...
        output_L3(1,k).H(3).hist, ...
        output_L3(1,k).H(4).hist];
    feature_4 = [feature_4, ...
        output_L4(1,k).H(1).hist, ...
        output_L4(1,k).H(2).hist, ...
        output_L4(1,k).H(3).hist, ...
        output_L4(1,k).H(4).hist, ...
        output_L4(1,k).H(5).hist, ...
        output_L4(1,k).H(6).hist, ...
        output_L4(1,k).H(7).hist, ...
        output_L4(1,k).H(8).hist];
    output_L1(k).features = [feature_1,feature_2,feature_3,feature_4];
    disp(sprintf('num of instance: %d',k));
end

